home *** CD-ROM | disk | FTP | other *** search
- Path: news.NetVision.net.il!news
- From: Jack <avilev@netvision.net.il>
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: 680X0 -> PPC translator?
- Date: Mon, 08 Apr 1996 10:55:48 -0700
- Organization: NetVision LTD.
- Message-ID: <31695324.57C8@netvision.net.il>
- References: <31499F8E.26A9@netvision.net.il> <volker.0fw1@vb.franken.de>
- <315800D7.1854@sapiens.com> <volker.0g32@vb.franken.de>
- <315C198B.49C2@netvision.net.il> <volker.0g5w@vb.franken.de>
- <1996Apr2.230841.8275@scala.scala.com> <31640B0C.23F5@netvision.net.il> <1586.6669T961T2657@und.ida.liu.se>
- NNTP-Posting-Host: ts001p9.pop4a.netvision.net.il
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.01 (Win16; I)
-
- Mans Engman wrote:
- >
- > Once you think a bit, it's easy to show (prove!) that static code<->data
- > distinction can't be determined by an algorithm. It is what theorists call
- > an "undecidable" problem. Granted, for a "real" computer with a finite amount
- > of memory/indata it can be "solved" by brute-force search, but this is
- > not a practical approach.
-
- many problems aren't solvable with today's technology, but it doesn't mean
- they're not solvable with other yet-to-devised methods, now do they??
-
-
- >
- > Okay, let's go on:
- >
- > 1) Hilberts 10th problem is a well known, proven undecidable problem. The
- > problem is determining whether an integer polynomial equation has a
- > (integer) solution.
-
- oh please, stick to the subject at hand and stop making irrelevant analogies.
-
- > 2) Now imagine a program calculating some function on the indata x, y, ...
- > and uses the result as a pc-relative address where we jump. This function,
- > and the rest of the program can be constructed such that for all x, y, ...
- > we jump to a legal piece of code. Between these code chunks we will of
- > course put data to confuse anyone analysing the program! :)
-
- you havn't really thought about the implementation of your hypothetic scenario
- have you?! in order for what you said to work you must store the offsets from the
- current locations in some array, and the inputs are used to calculate the array
- entry that should be selected that's all. calculating the correct number of bytes
- to skip from arbitrary inputs without using this method is next to impossible
- and most practical applications don't use this method.
- you can't confuse the analysing program because ALL code sequences can be identified
- without a problem, every sequence of words that makes sense as a code sequence must
- be executable code and therefore can be identified. by 'makes sense' i mean that the code
- makes references to other parts of the program and a sequence of code instructions is
- maintained, you simply have to follow the logic of that section and see if it's interrupted
- by some data word without a jump that would prevent such a thing from happening.
- you might wanna defer the translation until you make sure this section is actually being
- called from somewhere alse.
-
- > i) try different combinations of inputs and simulate the program. Inputs
- > include outside calls, memory reads (that may change anytime), or other
- > undecidable functions. To be sure the algorithm would have to try *all* of
- > them. Combinatorial-explosion-city?
-
- not true, as the code makes a jump using the array i mentioned and therefore i know
- the possible offsets that exist.
-
- Avi Lev.
-